package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_GCM_METADATA"
 *     
*/
public class CcpGcmMetadata implements Serializable {

    /** identifier field */
    private String mdGuid;

    /** persistent field */
    private String name;

    /** persistent field */
    private String datatypeCode;

    /** nullable persistent field */
    private BigDecimal mdLength;

    /** persistent field */
    private String sysFlag;

    /** nullable persistent field */
    private String description;

    /** persistent field */
    private String mdOrder;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public CcpGcmMetadata(String mdGuid, String name, String datatypeCode, BigDecimal mdLength, String sysFlag, String description, String mdOrder, String reserved1, String reserved2, String reserved3) {
        this.mdGuid = mdGuid;
        this.name = name;
        this.datatypeCode = datatypeCode;
        this.mdLength = mdLength;
        this.sysFlag = sysFlag;
        this.description = description;
        this.mdOrder = mdOrder;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public CcpGcmMetadata() {
    }

    /** minimal constructor */
    public CcpGcmMetadata(String mdGuid, String name, String datatypeCode, String sysFlag, String mdOrder) {
        this.mdGuid = mdGuid;
        this.name = name;
        this.datatypeCode = datatypeCode;
        this.sysFlag = sysFlag;
        this.mdOrder = mdOrder;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="MD_GUID"
     *         
     */
    public String getMdGuid() {
        return this.mdGuid;
    }

    public void setMdGuid(String mdGuid) {
        this.mdGuid = mdGuid;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="DATATYPE_CODE"
     *             length="2"
     *             not-null="true"
     *         
     */
    public String getDatatypeCode() {
        return this.datatypeCode;
    }

    public void setDatatypeCode(String datatypeCode) {
        this.datatypeCode = datatypeCode;
    }

    /** 
     *            @hibernate.property
     *             column="MD_LENGTH"
     *             length="38"
     *         
     */
    public BigDecimal getMdLength() {
        return this.mdLength;
    }

    public void setMdLength(BigDecimal mdLength) {
        this.mdLength = mdLength;
    }

    /** 
     *            @hibernate.property
     *             column="SYS_FLAG"
     *             length="1"
     *             not-null="true"
     *         
     */
    public String getSysFlag() {
        return this.sysFlag;
    }

    public void setSysFlag(String sysFlag) {
        this.sysFlag = sysFlag;
    }

    /** 
     *            @hibernate.property
     *             column="DESCRIPTION"
     *             length="200"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /** 
     *            @hibernate.property
     *             column="MD_ORDER"
     *             length="10"
     *             not-null="true"
     *         
     */
    public String getMdOrder() {
        return this.mdOrder;
    }

    public void setMdOrder(String mdOrder) {
        this.mdOrder = mdOrder;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="50"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="100"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("mdGuid", getMdGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpGcmMetadata) ) return false;
        CcpGcmMetadata castOther = (CcpGcmMetadata) other;
        return new EqualsBuilder()
            .append(this.getMdGuid(), castOther.getMdGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getMdGuid())
            .toHashCode();
    }

}
